package com.vincent.eurekaclient;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

@ApiIgnore
@SpringBootApplication
@EnableDiscoveryClient
@RestController
public class CloudEurekaClientApplication {

    public static void main(String[] args) {
        SpringApplication.run(CloudEurekaClientApplication.class, args);
    }

    @Value("${server.port}")
    private String port;

    @RequestMapping(value = "/", method = RequestMethod.GET)
    public String home() {
        return "Hello World, Port: " + port;
    }

    @RequestMapping(value = "/api", method = RequestMethod.GET)
    public String clientApi() {
        return "client api";
    }



}
